jQuery.infinitescroll = function()
{	
	if (location.pathname == '/')
	{
		var more_button = $(document.body).getElement('.load_more_posts');
	
		if (!more_button) return;
	
		_j(window).scroll(function()
		{
			if (_j(document).height() - _j(window).scrollTop() - _j(window).height() < 1200)
			{
				morePostsHandler.load(more_button);
			}
		});
	}
}

_j(document).ready(function(){ _j.infinitescroll() });